home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1991-12-03 | 334 b | 14 lines |
- Procedure DISTANCE[X1,Y1,X2,Y2]
- ' By John Smit
- ' Used to find the distance between two X Y points
- ' Distance returned to the Param veriable
- ' X1 and Y1 are one position - X2 and Y2 are the other
- X=Abs(X1)-Abs(X2)
- Y=Abs(Y1)-Abs(Y2)
- X3=Sqr((X*X)+(Y*Y))
- End Proc[X3]
- '
- ' example
- DISTANCE[1,1,5,10]
- X=Param
- Print X